<?php 
$width=Yii::app()->params['dialog']['findConsignorForGoodsName']['width'];
$height=Yii::app()->params['dialog']['findConsignorForGoodsName']['height'];
$cs=Yii::app()->clientScript;
$cs->registerScriptFile('./js/modal.js');
$cs->registerScript('driver_accident_dialog',<<<END
function Block(){\$.modal('?r=dialog/findConsignorForGoodsName',{width:$width,height:$height,title:'请选择货主(发货人)'});return false;}
$("#findConsignor").click(Block);
END
)
?>
<div class="yiiForm">
<?php
	echo EHtml::form();	
	EHtml::setOptions(array('errorElement'=> 'span'));
	EHtml::setScenario($update ? 'update' : 'create');				  		
?>
<div style="padding:10px 110px">注：<span class="required">*</span>为必填项,优先等级数值越大显示越靠前.</div>
<div id="one1">
<div class="simple">
<?php echo CHtml::activeLabelEx($model,'name'); ?>
<?php echo EHtml::activeTextField($model,'name',array('size'=>20,'maxlength'=>16));?>
</div>
<div class="simple1">
<?php echo CHtml::activeLabelEx($model,'consignor_name'); ?>
<?php echo EHtml::activeTextField($model,'consignor_name',array('size'=>20,'readOnly'=>'true','class'=>'readonly'));?>&nbsp;&nbsp;<a id="findConsignor" href="#">查找货主</a>
<?php echo CHtml::activeHiddenField($model,'fk_consignor_id'); ?>
</div>
<div class="simple">
<?php echo CHtml::activeLabelEx($model,'n_index'); ?>
<?php echo EHtml::activeTextField($model,'n_index',array('size'=>3));?>
</div>
</div>
<div class="simple4" style="width:502px;margin-left:106px;">
<?php echo CHtml::activeLabelEx($model,'conditions_of_carriage'); ?>
<?php echo EHtml::activeTextArea($model,'conditions_of_carriage',array('rows'=>6, 'cols'=>50)); ?>
</div>
<div class="action">
<?php echo EHtml::submitButton($update ? '更新信息' : '添加信息'); ?>
</div>

<?php echo EHtml::endForm(); ?>

</div><!-- yiiForm -->
<?php 
if($model->hasErrors()) echo "<script>alert('您填写的信息有误！请根据页面红色图标提示修改。');</script>";
?>